﻿<Window x:Class="Adan.Client.Map.Dialogs.RouteDeleteDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:Properties="clr-namespace:Adan.Client.Map.Properties"
        mc:Ignorable="d"
        Style="{StaticResource DefaultWindowStyle}"
        Title="{x:Static Properties:Resources.RouteDeleteTitle}"
        ResizeMode="NoResize"
        ShowInTaskbar="False"
        WindowStartupLocation="CenterOwner"
        WindowStyle="ToolWindow"
        Height="300"
        Width="299">
    <StackPanel VerticalAlignment="Stretch">
        <TextBlock TextTrimming="WordEllipsis"
                   Foreground="{DynamicResource TextBrush}"
                   FontSize="14"
                   Text="{x:Static Properties:Resources.RouteDeleteSelect}"
                   Margin="5"/>
        <ListBox Grid.Row="0"
                 Margin="5,0,5,5"
                 ItemsSource="{Binding Path=AllRoutes}"
                 SelectedItem="{Binding Path=SelectedRoute}"
                 HorizontalAlignment="Stretch"
                 Height="205">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal"
                                HorizontalAlignment="Stretch">
                        <TextBlock TextTrimming="CharacterEllipsis"
                                   Foreground="{DynamicResource TextBrush}"
                                   Text="{Binding StartName}"
                                   Width="100"/>
                        <TextBlock Foreground="{DynamicResource TextBrush}"
                                   Text="{Binding EndName}"
                                   TextTrimming="CharacterEllipsis"
                                   HorizontalAlignment="Stretch"/>
                    </StackPanel>

                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

        <StackPanel Orientation="Horizontal"
                    HorizontalAlignment="Right"
                    Margin="5">
            <Button IsDefault="True"
                    MinWidth="50"
                    Click="HandleOkClicked"
                    Content="{x:Static Properties:Resources.Ok}" />
            <Button IsCancel="True"
                    Margin="5,0,0,0"
                    MinWidth="50"
                    Content="{x:Static Properties:Resources.Cancel}" />
        </StackPanel>

    </StackPanel>
</Window>
